5 ONERRORGOTO500 10 MODE8:DIM:ERASEa:DIMa(5):a$="x1y1x2y2ab":c$=CHR$(5) 20 CLS:PRINT"y=ax+b - (x1,y1),(x2,y2)"; 30 FORi=0 TO3 40 LOCATE0,1:PRINTc$;MID$(a$,1+2*i,2);"=";a(i);"?";:INPUT@42;a(i):LOCATE0,0 50 NEXT:LOCATE0,1:PRINTc$; 70 IFa(0)=a(2) THENIFa(1)=a(3) THEN100 ELSEPRINTc$;"x =";a(0);:w$=INPUT$(1,@):GOTO30 72 IFa(1)=a(3) THENPRINTc$;"y =";a(1);:w$=INPUT$(1,@):GOTO30 75 a(4)=(a(3)-a(1))/(a(2)-a(0)):a(5)=a(1)-a(4)*a(0) 80 FORi=4 TO5:PRINTc$;MID$(a$,i+5,1);" =";a(i); 82 w=ASC(INPUT$(1,@)):IFw=13 THEN90 84 IFw=30 ANDi>4 THENi=i-2:GOTO90 85 IFw=31 ANDi<5 THEN90 88 GOTO82 90 NEXT:GOTO30 100 LOCATE0,1:PRINTc$;"not found";:w$=INPUT$(1,@):GOTO20 500 IFERR=1 THENCLS:ONERRORGOTO0 510 IFERL=40 THENRESUME40 520 RESUME100